package org.al.poc.router;

public class Router {
	
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {

//		if (args.length != 1) {
//			System.out.println("Usage: java Server webServer1 port1 webServer2 port2 portIN nbThreads");
//			System.exit(0);
//		}
//		
//		int port = Integer.parseInt(args[0]);
//		int nbThreads = Integer.parseInt(args[1]);
//		
//		WebServerInfo[] servers = new WebServerInfo[] {
//				new WebServerInfo(args[0], Integer.parseInt(args[1])),
//				new WebServerInfo(args[2], Integer.parseInt(args[3]))
//		};
//		

		int port = 9292;
		int nbThreads = 2;
		
		WebServerInfo[] servers = new WebServerInfo[] {
				new WebServerInfo("127.0.0.1", 9090),
				new WebServerInfo("127.0.0.1", 9191)
		};
		
		RoundRobin.setServers(servers[0], servers[1]);
		
		new ServerPart(port, nbThreads).run();

	}

}
